package pe.bf.extranet.web;

import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

public class CerrarServlet extends HttpServlet {
	private static final long serialVersionUID = 1L;

	public CerrarServlet() {
		super();
	}

	protected void doGet(HttpServletRequest request,
			HttpServletResponse response) throws ServletException, IOException {

		doPost(request, response);
	}

	protected void doPost(HttpServletRequest request,
			HttpServletResponse response) throws ServletException, IOException {
		request.getSession().removeAttribute("usuarioBean");
		request.getSession(false);
		Servlet teclado = new Servlet();
		teclado.generacionDeTeclado(request);
		request.getRequestDispatcher("index.jsp").forward(request, response);

		return;

	}

}
